package com.jams.goodox.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Jin on 2016/7/1.
 * Description
 */
public class CustomPagerAdapter extends FragmentPagerAdapter {

	private List<Fragment> fragmentList;

	public CustomPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
		super(fm);
		this.fragmentList = fragments;
	}

	@Override
	public int getCount() {
		return fragmentList.size();
	}

	@Override
	public Fragment getItem(int arg0) {
		return fragmentList.get(arg0);
	}

	@Override
	public int getItemPosition(Object object) {
		return super.getItemPosition(object);
	}
}
